package defpackage; import cn.wps.moffice.OfficeApp; import cn.wps.moffice_eng.R; import cn.wps.show.app.KmoPresentation; import com.google.gson.Gson; import defpackage.jyz; import defpackage.kae; import java.util.ArrayList; import java.util.List; /* renamed from: jzr reason: default package */ public final class jzr { public int hgt = 1; private Gson mGson = new Gson(); private jzp d(int i, int i2, String str, String str2) { jzq jzq = new jzq(); jzq.page = i; jzq.pageNum = 10; jzq.tag = str; jzq.lGK = str2; String json = this.mGson.toJson(jzq); kae.d dVar = new kae.d(); dVar.url = "https://easy.wps.cn/wppv3/fetch/libtagfilter"; kae.d FG = dVar.FG(json); FG.dyQ = kae.bWt(); String a = kae.a(FG); if (a != null) { try { return (jzp) this.mGson.fromJson(a, jzp.class); } catch (Exception e) { } } return null; } public final List<jyz> b(jxu jxu, KmoPresentation kmoPresentation, jei jei, String str, String str2, float f, String str3, String str4) { try { ArrayList arrayList = new ArrayList(); jzp d = d(this.hgt, 10, str, str2); if (d != null && d.isOk() && d.lLA != null && d.lLA.lJV != null && d.lLA.lJV.size() > 0) { for (int i = 0; i < d.lLA.lJV.size(); i++) { jyz jyz = new jyz(); jyz.extras = new ArrayList(); jyz.extras.add(new jyz.a("object", d.lLA.lJV.get(i))); jyz.extras.add(new jyz.a("keyword", str)); jyz.extras.add(new jyz.a("slideratio", Float.valueOf(f))); jyz.extras.add(new jyz.a("searchtype", str3)); jyz.extras.add(new jyz.a("searchsource", str4)); jyz.extras.add(new jyz.a("kmoPpt", kmoPresentation)); jyz.extras.add(new jyz.a("slideOpLogic", jei)); jyz.extras.add(new jyz.a("previewcallback", jxu)); arrayList.add(jyz); } int i2 = d.lLA.count; if (arrayList.size() <= 0 || this.hgt != 1) { return arrayList; } jyz jyz2 = new jyz(); jyz2.gEV = 1; jyz2.extras = new ArrayList(); jyz2.extras.add(new jyz.a("keyword", str)); jyz2.extras.add(new jyz.a("header", String.format(OfficeApp.arx().getString(R.string.phone_home_new_search_search_result), String.valueOf(i2)))); arrayList.add(0, jyz2); return arrayList; } else if (this.hgt != 1) { return arrayList; } else { jyz jyz3 = new jyz(); jyz3.gEV = 1; jyz3.extras = new ArrayList(); jyz3.extras.add(new jyz.a("keyword", str)); arrayList.add(jyz3); return arrayList; } } catch (Exception e) { return null; } } public final void bPH() { this.hgt++; } }